/*
 * Player.cpp
 *
 *  Created on: Dec 12, 2010
 *      Author: timmeh
 */

#include "Player.h"
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
using namespace std;


namespace bo {

Player::Player(const char* name, const int amOfLives) {
	this->fName = name;
	this->fScore = 0;
	this->fLives = amOfLives;
}

void Player::AddPoints(const int points){
	this->fScore += points;
}

int Player::GetLivesLeft(){
	return this->fLives;
}

void Player::DecLives(){
	--this->fLives;
}

const char* Player::GetName(){
	return this->fName;
}

const char* Player::GetScoreString(){
	std::ostringstream stream;
	stream << this->fScore;
	std::string temp = stream.str();
	return temp.c_str();
}

const char* Player::GetLivesLeftString(){
	std::ostringstream stream;
	stream << this->fLives;
	std::string temp = stream.str();
	return temp.c_str();
}

int Player::GetScore(){
	return this->fScore;
}

Player::~Player() {
	// TODO Auto-generated destructor stub
}

}
